package com.srq.mapper;

import com.srq.pojo.Worker;
import com.sun.xml.internal.bind.v2.model.core.ID;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

public interface WorkMapper {
    @Select("select * from tb_worker where id=#{id}")
    public Worker findWorkById(int id);
    @Update("update tb_worker set name=#{name}, age=#{age}"+"where id=#{id}")
    int updateWork(Worker worker);
    @Insert("insert into tb_worker(name,age,sex,worker_id)"+"values (#{name},#{age},#{sex},#{worker_id}")
    int insertWorker(Worker worker);
//    @Delete("delete from tb_worker where id=#{id}")
//    int delectWorker(int id);




}
